Skip to main content
POST
/
v4
/
knowledge_graph
/
neo4j
/
text
/
Train Neo4J Text
curl --request POST \
  --url https://rag-prod.studio.lyzr.ai/v4/knowledge_graph/neo4j/text/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "rag_id": "654c602a46c3b6d4e28741b0",
  "text": "The main product is Gemini. It is an AI model.",
  "schema_prompt": "Focus only on products and models as nodes."
}'
"Task successfully started."

Authorizations

x-api-key
string
header
required

Body

application/json
rag_id
string
required

The ID of the RAG system to train the knowledge graph for (e.g., a 24-character hex string).

Example:

"654c602a46c3b6d4e28741b0"

text
string
required

The raw text content to be processed and used for knowledge graph generation.

Example:

"Albert Einstein was born in Germany. He developed the theory of relativity."

schema_prompt
string | null

Allowed nodes and relationships for the knowledge graph (optional prompt for the LLM).

extra_info
object | null

Additional information or configuration for the task, provided as a JSON object.

Example:
{}

Response

Successful Response (Training task started).

The response is of type string.

Example:

"Task successfully started."